﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Maticsoft.DBUtility;
using MySql.Data.MySqlClient;
using EnvironmentManagerSystem.MODE;

namespace EnvironmentManagerSystem.BLL
{
    public class SystemconfigService
    {
        #region
        //更改短信状态
        public static bool UdEnabled(int SmsOpened)
        {
            try
            {
                string strSql = string.Format("UPDATE tbs001_systemconfig set SmsOpened={0}", SmsOpened);
                return DbHelperMySQL.ExecuteSql(strSql) > 0 ? true : false;
            }
            catch
            {
                return false;
            }
        }
        // 短信状态信息
        public static DataTable GetSystemconfigSEL()
        {
            try
            {
                string strSql = string.Format("SELECT * FROM tbs001_systemconfig");
                return DbHelperMySQL.Query(strSql).Tables[0];
            }
            catch
            {
                return null;
            }
        }
        #endregion
    }
}
